package service.Impl;

import dao.Impl.UserDaoImpl;
import dao.UserDao;
import entity.User;
import service.UserService;

public class UserServiceImpl implements UserService {

// 示例17
    private UserDao userDao;

    public UserDao getUserDao() {
        return userDao;
    }

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    private UserDao dao=new UserDaoImpl();

    public void addNewUser(User user){
        dao.save(user);
    }

    @Override
    public void save(User user) {
        dao.save(user);
    }
}
